﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.Data {
  
    public partial class RedFrozenRecordMap : EntityTypeConfiguration<RedFrozenRecord> {

        public RedFrozenRecordMap() {
            ToTable("mc_RedFrozenRecord", "dbo");
            HasKey(t => t.Id);
            Property(t => t.Id)
                .HasColumnName("Id")
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
            Property(t => t.RedDrill)
            .HasColumnName("RedDrill").HasPrecision(18, 6)
           .IsRequired();
            HasRequired(t => t.Merchant)
               .WithMany()
               .HasForeignKey(d => d.MerchantId)
               .WillCascadeOnDelete(false);
            HasRequired(t => t.TokenBazaarOrder)
             .WithMany()
             .HasForeignKey(d => d.OrderId)
             .WillCascadeOnDelete(false);
        }
    }
}
